package logger

import (
	"go.uber.org/zap"
	"go.uber.org/zap/zapcore"
)

type (
	option struct {
		zapOptions  []zap.Option
		interceptor func(entry zapcore.Entry) error
	}

	Option func(*option)
)

func WithZapOption(zapOptions ...zap.Option) Option {
	return func(o *option) {
		o.zapOptions = zapOptions
	}
}

func WithInterceptor(interceptor func(entry zapcore.Entry) error) Option {
	return func(o *option) {
		o.interceptor = interceptor
	}
}

func newOption() *option {
	return &option{}
}
